{#{% load sitetree %}#}
{% load i18n suit_menu %}
{% load url from suit_compat %}

<div class="left-nav" id="left-nav">
  <ul>
    {% block menu_home %}
      {% url 'admin:index' as index_url %}
      <li{% if index_url == request.path %} class="active"{% endif %}>
        <a href="{{ index_url }}"><i class="icon-home"></i>{% trans 'Home' %}
        </a>
      </li>
    {% endblock %}

    {% get_menu request as app_list %}
    {% if app_list %}
      {% for app in app_list %}
        {% if app.separator %}
          <li class="separator"></li>
        {% else %}
          <li{{ app.is_active|yesno:' class=active,' }}>
            <a href="{{ app.url }}"{{ app.blank|yesno:' target=_blank,' }}><i class="{% firstof app.icon 'icon-chevron-right' %}"></i>{% trans app.label|capfirst %}
            </a>
            {% if app.models %}
              <ul>
                {% for model in app.models %}
                  <li{{ model.is_active|yesno:' class=active,' }}>
                    <a href="{{ model.url }}"{{ model.blank|yesno:' target=_blank,' }}>{{ model.label }}</a></li>
                {% endfor %}
              </ul>
            {% endif %}
          </li>
        {% endif %}
      {% endfor %}
    {% endif %}
  </ul>
</div>
